<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style></style>
  </head>
  <body>
    <script>
      //接受传的参数 分析然后js生成一个表单
      var str = window.location.search.substr(1);
      document.write(str);
      var arr = str.split("&");
      //构建表单
      var str1 = "<table><tr>";
      for (i = 0; i < arr.length; i++) {
        var res = arr[i].split("=");
        str1 += `<td>${res[0]}<td>`;
      }
      str1 += "</tr><tr>"; //初始化表头
      for (i = 0; i < arr.length; i++) {
        var res = arr[i].split("=");
        str1 += `<td>${res[1]}<td>`;
      }
      str1 += "</tr></table>";
      document.documentElement.innerHTML = str1;
    </script>
  </body>
</html>
